//app.js
App({
  //当小程序初始化完成时，会触发 onLaunch（全局只触发一次）
  //*如果需要自动登陆，就放在“index”启动页面里面
  onLaunch: function () {
    // 展示本地存储能力
    var logs = wx.getStorageSync('logs') || []
    logs.unshift(Date.now())
    wx.setStorageSync('logs', logs)
  },

  setTitle: function (str) {
    wx.setNavigationBarTitle({
      title: str
    })
  },

  //全局变量
  globalData: {
    urlPath: "https://www.jsonfree.com/mgxapi",//正式环境
    //urlPath: "https://www.jsonfree.com/mgxapi.test",  //测试环境
    //urlPath: "http://localhost:13772", //本地开发环境
    //urlPath: "http://127.0.0.1/MGX",     //本地部署环境
    //urlPath: "http://134.175.5.243", //腾讯云灰度测试，只能电脑测试
    userInfo: "",  //微信API用户信息，别名、地址城市等
    userInfo_db: null,
    mapKeyWords: null,
    openid: null,
    mgxUserInfo: null,
    loginInfo: null,
    userHash: null,
    isAuth: null,
    pkgm: null,
    depk: null,
    appSource: 1,
  }
})
